import request from '@/utils/request'

// 查询书店列表
export function listLibrary(query) {
  return request({
    url: '/bookstore/library/list',
    method: 'get',
    params: query
  })
}

// 查询书店详细
export function getLibrary(id) {
  return request({
    url: '/bookstore/library/' + id,
    method: 'get'
  })
}

// 新增书店
export function addLibrary(data) {
  return request({
    url: '/bookstore/library',
    method: 'post',
    data: data
  })
}

// 修改书店
export function updateLibrary(data) {
  return request({
    url: '/bookstore/library',
    method: 'put',
    data: data
  })
}

// 删除书店
export function delLibrary(id) {
  return request({
    url: '/bookstore/library/' + id,
    method: 'delete'
  })
}
